<template>
    <div :style="{height: height+'px'}">
        <div v-for="product in salesSort" class="sales_sort" >
            <div class="title">{{product.product_title}}</div>
            <div class="num">+{{product.num}}</div>
        </div>
    </div>

</template>

<script setup lang="ts">

// 商品销量排行榜
import {simpleGet} from "@/utils/request";
import {ref} from "vue";
const props = defineProps({
    height:{type:Number, default: 300}
})
const salesSort = ref<any[]>([])

simpleGet("/index/salesSort").then(({list}) => {
    salesSort.value = list
})
</script>

<style scoped lang="scss">
.sales_sort{
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    margin-bottom: 10px;
    color: #666;
    background-color: #f6f8f8;
    padding: .8em;
    box-sizing: border-box;
    border-radius: 8px;
    .num{
        color: #e50b0b;
    }
}
</style>